/**
 * Notes: 门店实体 - 宠物门店预约小程序
 * Date: 2025-01-27 
 */

const BaseModel = require('./base_model.js');
class StoreModel extends BaseModel {}

// 集合名
StoreModel.CL = "ax_stores";

StoreModel.DB_STRUCTURE = {
	_pid: 'string|true',
	_id: 'string|true|comment=门店唯一ID',
	storeId: 'int|false|comment=门店数字ID，用于前端查询',
	
	name: 'string|true|comment=门店名称',
	address: 'string|false|comment=详细地址',
	location: 'object|false|comment=地理位置坐标',
	phone: 'string|false|comment=门店联系电话',
	openingHours: 'string|false|comment=营业时段',
	coverImage: 'string|false|comment=门店封面图',
	doorLockId: 'string|false|comment=智能门锁设备ID',
	status: 'int|true|default=1|comment=状态 1:营业中, 0:休息中',
	
	createTime: 'int|true|comment=创建时间',
	updateTime: 'int|true|comment=更新时间',
}

// 字段前缀
StoreModel.FIELD_PREFIX = "";

// 禁用自动添加时间、IP和ID字段
StoreModel.UPDATE_TIME = false;
StoreModel.UPDATE_IP = false;
StoreModel.ADD_ID = false;

/**
 * 门店状态
 */
StoreModel.STATUS = {
	CLOSED: 0,    // 休息中
	OPEN: 1       // 营业中
};

StoreModel.STATUS_DESC = {
	CLOSED: '休息中',
	OPEN: '营业中'
};

module.exports = StoreModel;
